package entity.fields;

import controllers.FieldController;
import dto.Field;

public class Tax extends Field {

	private boolean incomeTax;
	private int taxValue;
	
	public Tax(String name, int taxValue, boolean incomeTax, FieldController fieldController) {
		super(name, fieldController);

		this.incomeTax = incomeTax;
		this.taxValue = taxValue;
	}
	
	public boolean isIncomeTax(){
		return this.incomeTax;
	}
	
	public int getTaxValue(){
		return this.taxValue; 
	}

	@Override
	public String toString() {
		return taxValue + (incomeTax ? " el. 10%" : "");
	}

	@Override
	public String getDescription() {
		if(incomeTax) 
			return "Indkomst skat: " + taxValue;
		else 
			return "Skat: " + taxValue;
	}

	@Override
	public void reset() {}
}
